<template>
  <div class="step-tip-box" v-if="isVisiableShow">
    <div class="step-tip-content">
      {{ stepContent }}
    </div>
    <div class="step-button" v-if="showClose" @click="handleClose">
      <a-button class="btn" size="small" type="primary">关闭</a-button>
    </div>
  </div>
</template>
<script setup>
import { ref ,computed} from "vue";
import { useTipsStore } from "@/store/modules/tips";
const store = useTipsStore();
const props = defineProps({
  showClose: {
    type: Boolean,
    default: true,
  },
});
const isVisiableShow = computed(() => {
  return store.showNotAutoTip;
});
const stepContent = computed(() => {
  return store.notAutoTipContent;
});
const handleClose = () => {
  store.setShowNotAutoTip(false);
};
</script>
<style scoped lang="less">
.step-tip-box {
  position: fixed;
  top: 20%;
  left: 50%;
  transform: translateX(-50%) translateY(-50%);
  background: #fff;
  border-radius: 8px;
  padding: 20px 20px 0;
  max-width: 80%;
  color: #fff;
  overflow: hidden;
  text-align: center;
  z-index: 1000;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  .step-tip-content {
    color: #333;
    font-size: 16px;
  }
  .step-button {
    border-top: 1px solid #eee;
    padding: 12px 0;
    display: flex;
    margin-top: 12px;
    justify-content: flex-end;
    .button {
    }
  }
}
</style>
